/*
 * @Author: moonwater 13812995013@163.com
 * @Date: 2025-03-10 11:02:11
 * @LastEditors: moonwater 13812995013@163.com
 * @LastEditTime: 2025-03-10 11:32:08
 * @FilePath: \盐师22Git仓库\day11\HomeWorkTest04.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day11;

import java.util.Arrays;
import java.lang.Math;

public class HomeWorkTest04 {
    public static void main(String[] args) {
        //生成随机数
        //定义一个数组 用来存放10个int类型的随机数
        int [] arrR = new int [10];
        //生成随机数
        for (int i = 0; i < arrR.length; i++) {
            int r = (int) (Math.random() * 100 + 1);
            arrR[i] = r;
        }
        //输出数组
        System.out.println("随机数数组：" + Arrays.toString(arrR));

        //生成4位包含大小写字母和数组的验证码 验证码原始内容
        String[] s ={"A","B","a","b","1","2","3"};
        //随机获取四位 存到数组中
        String[] codeStrings = new String[4];
        for (int i = 0; i < codeStrings.length; i++) {
            int index = (int) ((Math.random() * (s.length +1)));
            codeStrings[i] = s[index];
        }
        System.out.println("验证码：" + Arrays.toString(codeStrings));

        //快速创建一个数组 包含 A-Z a-z 0-9 这全部字符
        char[] data = new char[62];
        //存放所有大写字母
        char c = 'A';
        for (int i = 0; i < 27; i++) {
            data[i] = c++;
            System.out.println("c++" + c++);
        }
        c = 'A';
        for (int i = 0; i < data.length; i++) {
            
        }
    }
}
